$active: #99e67d;
$migrate: #ffe88e;
$future: #c1edff;

.calendar-releases {
  .table {
    width: 100%;
    border-spacing: 0;

    tr td {
      border-top: 1px solid #ebf2f2;
      font-size: 14px;
    }

    thead tr th {
      border-top: 0 none;
    }

    td,
    th {
      padding: 12px 12px;
      text-align: left;
    }

    td.head {
      background: #ebf2f2;
      font-weight: bold;
    }

    .past {
      color: #888;
      // text-decoration: line-through;
    }

    .release > div,
    .release strong {
      position: relative;
      display: inline-block;
      padding-left: 22px;
      font-weight: normal;
    }

    .status {
      position: absolute;
      top: 2px;
      left: 0;
      width: 15px;
      height: 15px;
      background: #ecf2f2;
      border-radius: 8px;
    }

    [data-status="migrate"] .status {
      background-color: $migrate;
    }

    [data-status="active"] .status {
      background-color: $active;
    }

    [data-status="coming"] .status {
      background-color: $future;
    }

  }

  .timeline {
    margin: 2rem 0 2rem 2rem;
    padding: 0 0 2rem;
    position: relative;

    &.t7 {
      .axis .year {
        width: 13.571428571%;
      }
    }

    &.t6 {
      .axis .year {
        width: 15.8333333333%;
      }
    }

    &.t5 {
      .axis .year {
        width: 19%;
      }
    }

    &.t4 {
      .axis .year {
        width: 23.75%;
      }
    }

    &.t3 {
      .axis .year {
        width: 31.666666667%;
      }
    }

    .axis {
      position: absolute;
      top: 0;
      left: 1px;
      right: 0;
      bottom: 0;
      display: flex;
      z-index: 7;

      .year {
        box-shadow: inset 1px 0 0 #ecf2f2;
        width: 19%;
        margin-top: 30px;

        &:last-child {
          width: 5%;
        }

        .label {
          display: block;
          width: 80px;
          text-align: center;
          margin-left: -40px;
          margin-top: -25px;
          left: 0;
          font-size: 14px;
        }
      }
    }

    .releases {
      padding-top: 30px;
      z-index: 100;

      .head {
        $h: 40px;
        height: $h;
        line-height: $h;
        margin-top: 8px;

        .content {
          position: absolute;
          background: #ecf2f2;
          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.05);
          left: 0;
          right: 0;
          height: $h;
          line-height: $h;
          font-weight: bold;
          padding-left: 10px;
          z-index: 8;
        }
      }

      .release {
        position: relative;
        height: 26px;
        margin: 4px 0 4px 1px;
      }

      .plop-active,
      .plop-migrate {
        height: 26px;
        position: absolute;
      }

      .plop-active {
        background: $active;
        z-index: 1;
        height: 14px;
        top: 12px;
        &.coming {
          background: $future;
          height: 26px;
          top: 0px;
        }
      }

      .plop-migrate {
        z-index: 0;
        width: 9.5%;
        background: $migrate;
        left: 38%;
      }

      .label {
        position: absolute;
        left: -100px;
        top: 0;
        background: #ecf2f2;
        font-size: 14px;
        font-weight: bold;

        a {
          color: #000;
          text-decoration: none;

          &:hover {
            text-decoration: underline;
          }
        }

        a,
        span {
          display: inline-block;
          padding: 0 8px;
          height: 26px;
          line-height: 26px;
        }

        &[data-status="active"], &.active {
          background: $active;
        }

        &[data-status="migrate"], &.migrate {
          background: $migrate;
        }

        &[data-status="coming"], &.coming {
          background: $future;
        }
      }

      .date {
        position: absolute;
        left: -40px;
        top: -10px;
        width: 80px;
        text-align: center;
        font-size: 12px;
        z-index: 20;
        opacity: 0;
        transition: all 100ms;

        span {
          margin: 0 auto;
          display: inline-block;
          background: #000;
          color: #fff;
          padding: 2px 6px;
        }

        &.right {
          left: auto;
          right: -40px;
        }
      }

      .release.active {
        .date {
          opacity: 1;
        }
      }
    }

    .current-date {
      position: absolute;
      top: 25px;
      bottom: 20px;
      width: 100px;
      margin-left: -50px;
      background-image: url('');
      background-repeat: repeat-y;
      background-size: 3px 5px;
      background-position: center 0;
      z-index: 10;
      //border-left: 1px dotted #086dc3;
      .label {
        color: #086dc3;
        position: absolute;
        bottom: 0;
        margin-bottom: -20px;
        width: 100px;
        text-align: center;
        font-weight: bold;
      }
    }

  }
}

.release-legend {
  // position: absolute;
  // bottom: -150px;
  // left: 0;
  // right: 0;
  text-align: left;
  > div {
    display: block;
    position: relative;
    padding-left: 30px;
    padding-right: 20px;
    white-space: nowrap;
    font-size: 14px;
    margin: .6rem 0;
    &:before {
      content: '';
      position: absolute;
      height: 20px;
      width: 20px;
      left: 0;
      background: #ecf2f2;
    }

    p, h3 {
      margin: 0;
      padding: 0;
    }

    div.title {
      font-weight: bold;
    }

    &.oss {
      &:before {
        background: $active;
      }
    }

    &.commercial {
      &:before {
        background: $migrate;
      }
    }

    &.future {
      &:before {
        background: $future;
      }
    }
  }
}

.release-learn {
  background: #ebf2f2;
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  position: relative;
  text-align: center;
  h2 {
    margin: 0;
    padding-bottom: 6px;
    text-align: center;
  }
  .release-learn-action {
    padding-top: 10px;
    text-align: center;
  }
}

.compass .project-content a.button {
  color: rgb(25, 30, 30);
  &:hover {
    color: white;
  }
}
